<template>
	<view>
		<view class="content">
			<view class="title" v-cloak>{{res.title}}</view>
			<view class="createtime" v-cloak>发布时间 : {{res.createtime}}</view>
			<view class="art-content">
				<rich-text class="richText" :nodes="res.detail"></rich-text>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				res:[]
			};
		},
		onLoad:function(e){
			uni.showLoading()
			uni.request({
				url: this.$BASE_URL+'/index.php?i=2&c=entry&m=ewei_shopv2&do=mobile&r=shop.notice.detail&app=1&id='+e.newsid,
				success: res => {
					this.res = res.data;
					uni.hideLoading();
					var content = res.data.detail;
					content = content.replace(/data-lazy/g,"src");
					content = content.replace(/style="/g,'style="width:100%;')
					this.res.detail = content;
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>.content{background:#fff;padding:20upx;padding-bottom:40upx;}.title{width:100%;font-size:36upx;text-align:center;word-break:break-all;color:#333;font-weight:bold;}.createtime{padding-top:8upx;width:100%;font-size:28upx;word-break:break-all;color:#aaa;text-align:center;border-bottom:1px solid #e0e0e0;padding-bottom:10upx;}.art-content{padding-top:20upx;}</style>